#include <iostream>
#include <string>
#include <map>
#define bin 61 
using namespace std;
//utf-8



void eprepare(char *a){
	for(int i=0;i<=9;i++)
		a[i] = '0'+i;
	for(int i=0;i<26;i++)
		a[i+10] = 'a'+i;
	for(int i=0;i<26;i++)
		a[i+36] = 'A'+i;
	return;
}


string encrypt(int n,int *plaintext,char *a){
	string res="";
	for(int i=0;i<n;i++){
		int fir,sec,thi;
		thi = plaintext[i]%bin;
		plaintext[i] = (plaintext[i]-thi)/bin;
		sec = plaintext[i]%bin;
		plaintext[i] = (plaintext[i]-sec)/bin;
		fir = plaintext[i]%bin;
		res += a[fir];
		res += a[sec];
		res += a[thi];
	}
	return res;
}


int main(){
	char a[bin+1];
	eprepare(a);
	string input;
	cin>>input;
	int plaintext[input.length()];
	for(int i=0;i<input.length();i++)
		plaintext[i] = input[i];
	cout<<encrypt(input.length(),plaintext,a)<<endl;
//	for(int i=0;i<bin+1;i++)
//		cout<<a[i]<<" ";
	return 0;
}
